Skip to content

Conversation

@sentrivana
Copy link
Contributor

@sentrivana sentrivana commented Jun 12, 2025

DESCRIBE YOUR PR

Since we started supporting Sentry logs via the logging integration (and more recently Loguru), we haven't added the new sentry_logs_level option used to fine-tune which logs should be captured. Adding it here.

Direct links to preview:

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

EXTRA RESOURCES

@vercel
Copy link

vercel bot commented Jun 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 12, 2025 0:37am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Visit Preview Jun 12, 2025 0:37am

@codecov
Copy link

codecov bot commented Jun 12, 2025

Bundle Report

Changes will decrease total bundle size by 15 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 10.91MB -9 bytes (-0.0%) ⬇️
sentry-docs-client-array-push 9.77MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 873.24kB -0.0%
static/chunks/7750-*.js -3 bytes 401.83kB -0.0%
server/middleware-*.js -5.55kB 1.0kB -84.74%
server/middleware-*.js 5.55kB 6.55kB 555.3% ⚠️
static/g9SCN_DIknXeWOzBJmcgh/_buildManifest.js (New) 616 bytes 616 bytes 100.0% 🚀
static/g9SCN_DIknXeWOzBJmcgh/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/EXBbRPhru82ltUDtw0Blj/_buildManifest.js (Deleted) -616 bytes 0 bytes -100.0% 🗑️
static/EXBbRPhru82ltUDtw0Blj/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.64MB -0.0%
../instrumentation.js -3 bytes 973.36kB -0.0%
9523.js -3 bytes 949.31kB -0.0%

@sentrivana sentrivana changed the title feat(python): Add sentry_logs_level option to Loguru, Logging integration feat(python): Add sentry_logs_level option to Loguru, logging integration Jun 12, 2025
@sentrivana sentrivana marked this pull request as ready for review June 12, 2025 11:19
@sentrivana sentrivana requested review from a team June 12, 2025 11:19
Copy link
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding! Please address my suggestions before merging, otherwise lgtm (I can also do a second pass review after your changes if you'd like, please lmk)

Comment on lines 75 to 77
level=logging.INFO, # Capture INFO and above as breadcrumbs
event_level=logging.INFO, # Send INFO records as events
sentry_logs_level=logging.WARNING, # Capture WARNING and above as logs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest setting these to more realistic levels; specifically, it seems unrealistic to me that someone would want their event_level below the sentry_logs_level

Maybe set level to debug, event_level to warning, and sentry_logs_level also to debug?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, alternatively, it might be helpful to just demonstrate setting each of the levels to their respective defaults; that way, folks are not confused into thinking that these values are the default values.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to default values

sentrivana and others added 2 commits June 12, 2025 14:11
Co-authored-by: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com>
@sentrivana sentrivana enabled auto-merge (squash) June 12, 2025 12:20
@sentrivana sentrivana merged commit d17d325 into master Jun 12, 2025
12 checks passed
@sentrivana sentrivana deleted the ivana/python/sentry-logs-level branch June 12, 2025 12:37
@github-actions github-actions bot locked and limited conversation to collaborators Jun 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants